package com.etc.springbootssm.service.impl;

import com.etc.springbootssm.dao.DiseaseMapper;
import com.etc.springbootssm.entity.Disease;
import com.etc.springbootssm.service.DiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author ZZZZZZ
* @description 针对表【disease】的数据库操作Mapper
* @createDate 2022-11-09 00:42:39
* @Entity com.etc.springbootssm.entity.Disease
*/
@Service
public class DiseaseServiceImpl implements DiseaseService {

    @Autowired
    private DiseaseMapper diseaseMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return diseaseMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Disease record) {
        return diseaseMapper.insert(record);
    }

    @Override
    public int insertSelective(Disease record) {
        return diseaseMapper.insertSelective(record);
    }

    @Override
    public Disease selectByPrimaryKey(Long id) {
        return diseaseMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Disease record) {
        return diseaseMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Disease record) {
        return diseaseMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Disease> selectByPage(String keywords) {
        return diseaseMapper.selectByPage("%"+keywords+"%");
    }
}
